package com.sptpc.demo1.model;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import javax.validation.constraints.NotBlank;
import java.time.LocalDate;

@Entity//定义该类将会成为被JPA管理的实体，会映射到指定的数据库表
@Table(name = "user")//指定表名为t_drink

@Data
@NoArgsConstructor
@AllArgsConstructor //创建全参构造函数
@Builder
public class Book {
    @Id//标志主键
    @GeneratedValue(strategy = GenerationType.IDENTITY)//设置为自增字段
    public Integer id; // 编号


    @Column(name = "jiayouzhan")
    public String jiayouzhan ;

    @Column(name = "oilkind")
    public String oilkind ;

    @Column(name = "price")
    public Double price ;


    @Column(name = "mount")
    public Double mount ;
}
